#ifndef MESSAGEWIDGET_H
#define MESSAGEWIDGET_H

#include <QWidget>
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include "model.h"

class MessageWidget : public QWidget
{
    Q_OBJECT

public:
    explicit MessageWidget(const model::Message& message, bool isOwnMessage, QWidget* parent = nullptr);

private:
    void setupUI();
    void setupOwnMessageUI();
    void setupOtherMessageUI();

    model::Message m_message;
    bool m_isOwnMessage;
    QLabel* m_avatarLabel;
    QLabel* m_nameLabel;
    QLabel* m_contentLabel;
    QLabel* m_timeLabel;
};

#endif // MESSAGEWIDGET_H
